<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
    <meta http-equiv="expires" content="0">
    <title>参与成功</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/2.0.1/weui.min.css">
    <script type="text/javascript" src="https://res.wx.qq.com/open/libs/weuijs/1.2.1/weui.min.js"></script>
    <style>
        .code{
            font-size: 20px;
            margin-left: 10px;
            color: #eab976;
            font-weight: bold;
        }
    </style>
</head>
<body>
<div style="position:absolute;bottom:0;left:0;width:100%;height:100%;overflow:auto;z-index:1;padding-bottom: 230px;background: #eee;">
    <img src="./img/success.png" style="display:block;width: 40%;margin: 30px auto 0;" alt="">
    <h3 class="text-center" style="color: #2aabd2;margin-bottom: 20px;">参与成功!</h3>
    <p class="text-center">您的兑奖码是:<span class="code" id="code"></span></p>
<!--    <h6 class="text-center" style="margin-bottom: 20px;" id="draw_time">开奖日期：2019-09-06</h6>-->
    <h6 class="text-center" style="margin-bottom: 20px;" id="draw_time"></h6>
    <h5 class="text-center" style="margin-bottom: 20px;">温馨提示：记得来查看中奖公告哦！</h5>
    <div class="container" style="text-align: center;">
        <button class="btn btn-gold" onclick="location.replace('./index.html')">返回首页</button>
    </div>
</div>
<!--<div style="position: absolute;bottom: 0;left: 0;height:230px;width: 100%;z-index: 2;">-->
<!--    <p>猜你喜欢</p>-->
<!--    <div>-->
<!--        -->
<!--    </div>-->
</div>
<script src="js/jquery.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script src="js/sha1.js"></script>
<script src="js/config.js"></script>
<script src="js/public2.js"></script>
<script type="text/javascript">
    let participate_id = getQueryVariable('participate_id');
    if(!participate_id){
        alert('未传参数');
        location.replace('./index.html');
    }
    function afterVerify(){
        //验证这次抽奖是否成功
        $.post(baseUrl+'client/success/check',{
            participate_id:participate_id,
        },function(result){
            if(result.code === 0) {
                weui.dialog({
                    title: '报名成功',
                    content: '<div style="text-align: center;"><p>您的兑奖码是:</p><p style="font-size:30px; color: #eab976;font-weight: bold;">'+result.data.code+'</p></div>',
                    className: 'custom-classname',
                    buttons: [{
                        label: '确定',
                        type: 'primary',
                    }]
                });
                $('#draw_time').html('开奖时间：'+result.data.draw_time);
                $('#code').html(result.data.code);
            }else{
                alert(result.msg);
                location.replace('./index.html');
            }
        },'json');
    }

</script>
<script src="js/verify.js"></script>
</body>
</html>
